Skip to content

ci: Fall back to github.token when COMMAND_BOT_PAT is unavailable - #759

Merged
nickvergessen merged 1 commit into
masterfrom
ci/noid/tokenFallback
Jul 6, 2026
Merged

ci: Fall back to github.token when COMMAND_BOT_PAT is unavailable#759
nickvergessen merged 1 commit into
masterfrom
ci/noid/tokenFallback

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

Summary

Follow-up to #756, which switched GH_TOKEN to secrets.COMMAND_BOT_PAT. Dependabot- and fork-triggered pull_request runs don't receive repository/organization Actions secrets, so the PAT resolves to an empty string and gh exits with code 4 on the very first step (see the failing runs on #757 and #758).

This adds a fallback so those runs use the default workflow token instead:

GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT || github.token }}
  • The collect step only reads commit messages, which the default read-only token can always do — this unblocks Dependabot and fork PRs.
  • The label steps still prefer the PAT when available; they only fire when AI trailers are detected, which won't happen on Dependabot PRs.

Applied to both the live workflow and the org template.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🤖 Generated with Claude Code

Dependabot- and fork-triggered pull_request runs don't receive
repository or organization Actions secrets, so COMMAND_BOT_PAT
resolves to an empty string and gh exits with code 4 before any
check runs. The default token always exists and is sufficient for
reading commit messages; the label steps keep preferring the PAT
when it is available.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Jul 6, 2026
@nickvergessen
nickvergessen merged commit f26ada0 into master Jul 6, 2026
6 checks passed
@nickvergessen
nickvergessen deleted the ci/noid/tokenFallback branch July 6, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants